<?
require '../inc.php';
$set = array(
	'pageName'	=> 'area.js',	//本页面的文件名 没有扩展名
	'minSize' 	=> 10240,		//最少cache的大小 字节
	'dirCount'	=> 30,			//几*几的目录
	'cacheTime'	=> 7*24*3600,	//cache时间
	'outEnd'	=> '.html',		//cache 文件的扩展名
	'endDoing'  => 'in'			//在以有缓存时 go:跳转(go?:加随机时间跳转) in:包含 
);
//wc::cache(array(),$set,$_GET['dy']);

$db_member = &new db($scfg['db']['member']);
$c1 = $db_member->dataArray("select * from  area_c1 order by taxis,a1id ");
$c2 = $db_member->dataArray("select * from  area_c2 order by taxis,a2id ");
//$c3 = $db_member->dataArray("select * from  area_c3 order by taxis,a3id ");
$rs = array();
foreach($c1 as &$v)
{
	$rs[$v['a1id']][0] = array($v['name'],$v['a1id']);
}
foreach($c2 as &$v)
{
	$rs[$v['a1id']][1][$v['a2id']][0] = array($v['name'],$v['a2id']);
}
/*foreach($c3 as &$v)
{
	$rs[$v['a1id']][1][$v['a2id']][1][$v['a3id']][0]=array($v['name'],$v['a3id']);
}*/
echo "var areas =".json::encode($rs);
?>







